<?php
//TuấnNK add (2008.06.17_10h):
//Các xử lý cho ajax:


require_once 'core/Debug.php'; //System Debug...
require_once 'core/config.php'; //System Config...
require_once 'core/redis_key.php'; //System Config...
require_once 'core/Init.php';  //System Init...
//System process & output for ajax request

$choice = array(
				    "index" 		=> "index",
				    "user" 			=> "ajax_user",
				    "item" 			=> "ajax_item",
					"message" 		=> "ajax_message",
				    "personal" 		=> "ajax_personal",
				    "admin" 		=> "ajax_admin",
				    "payment" 		=> "ajax_payment",
                    "hotel" 		=> "ajax_hotel",
                    "hotel_review"  => "ajax_hotelreview",
                    "image" 		=> "ajax_image",
                    "location" 		=> "ajax_location",
                    "locationpage" 	=> "ajax_locationpage",
                    "room" 		    => "ajax_room",
                    "booking" 		=> "ajax_booking",
                    "news" 		    => "ajax_news",
                    "email" 	    => "ajax_email",
                    "promotion"     => "ajax_promotion",
                    "processcart"   => "ajax_processcart",
                    "home"          => "ajax_home",
                    "comparehotel"  => "ajax_comparehotel",
                    "deal"          => "ajax_deal",
                    "travel"        => "ajax_travel"
					);

$action = Url::getParam('act');

if ($action == "" || !isset($choice[$action]) || $choice[$action] == "")
{
    $choice[$action] = "index";
}

require_once(ROOT_PATH . "includes/ajax_action/" . $choice[$action] . ".ajax.php");
$run_me = new $choice[$action] ();
$run_me->playme();

//End process & ouput
//Stop System
System::halt();
?>